//==============================
//FileName=test_osd.c
//Date=20060518
//==============================
#include"Header\public.h"
#include<string.h>
#include <intrins.h>
#include<ctype.h>
#include"Header\delay.h"
#include"Header\SerialPort.h"
#include"Header\osdcmd.h"
#include"Header\ia7453.h"
#include"Header\dismenu.h"
#include"Header\A3967SLB.H"
#include"Header\I2C.H" 



uchar rxdata;
uchar code *dat[6];
uchar code charad[]={0x23,0x15,0x1c,0x16,0x24,0x15,0x23,0x24};    	 

void Init_IO()
{
	 P0M0 = 0xF0;
	 P0M1 = 0x00;
	 P1M0 = 0x00;
	 P1M1 = 0x00;
	 P2M0 = 0x0F;							 
	 P2M1 = 0x00;
	 P3M0 = 0xF0;
	 P3M1 = 0x0C;
}

void HardInit()
{
     serial_port_one_initial(9600);
	 serial_port_two_initial(9600);
	  //PCA_TimerInit();
	  //ExInit();
     //stop_motor_hs();
     //stop_motor_vs();
	  EA = 1;
}



void main(void)
{
   uchar i,x,y;																								
	HardInit();	
	Init_I2C();
	init_osd();
	LED = 0;
	delay_ms(299);
	LED = 1;
	//dismenu_main();
	//EN_485 = 0;
	
	while(1)
	{ 
	   if(Rx1Buffer[0]==0xa1)
	   {
	      dismenu_main();
		  Rx1Buffer[0] = 0;
	   }
	   if(Rx1Buffer[0]==0xa2)
	   {
          dismenu_enter();
		  Rx1Buffer[0] = 0;
	   }		 
	}

}





